<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%request.setAttribute("ctx",request.getContextPath()); %>
<html>
<head>
<link href="${ctx}/extend/css/style.css" rel="stylesheet"
	type="text/css" />
<script src="${ctx}/extend/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/extend/js/dutil/DUtil.js" type="text/javascript"></script>
<script src="${ctx}/extend/css/css.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css" />
<script src="${ctx}/js/common.js" type="text/javascript"></script>
<title>eBay Account List</title>
<script type="text/javascript">
	function addAct(){
	    window.open('${ctx}/admin/toAddEbayAct', "md_add",  "width=1000,height=750,top=6,left=10,scrollbars=auto");
    }
    function viewDetail(ebayActId) {
    	window.open('${ctx}/admin/viewEbayAct?ebayActId='+ebayActId, "act_view",  "width=1000,height=750,top=6,left=10,scrollbars=auto");
    }

</script>
</head>
<body class="maintable">
	<div class="dclass_container dclass_container_collapsible">
		<div class="dclass_container_header">
			<div class="dclass_container_title">Search eBay Account</div>
		</div>
		<div class="dclass_container_content">
			<div class="search">
				<form action="" method="get">
					<table>
						<tr>
							<td>eBay Account:<input type="text" class="inputsearch"
								name="ebayAct" value="${ebayAct}" /> &nbsp;&nbsp;&nbsp; <input
								type="image" src="${ctx}/images/btn_search.gif"
								align="absbottom" /></td>
						</tr>
					</table>
				</form>
			</div>


		</div>
	</div>
	<br style="line-height: 5px;" />


	<div class="dclass_container">
		<div class="dclass_container_header">
			<div class="dclass_container_title">eBay Account List</div>
		</div>
		<div class="dclass_container_content">
			<!--内容开始-->
			<div class="actions">
				<input type="button" class="btn1" name="viewPic" onclick="addAct();"
					value="Add Account" />&nbsp;
			</div>
			<table class="dclass_data" id="table1" style="display: block">
				<thead>
					<tr>
						<th align="center" width="5%">NO ${User.userName}</th>
						<th align="center" width="15%">eBay Account</th>
						<th align="center" width="15%">Email Account</th>
						<th align="center" width="15%">Email Password</th>
					</tr>
				</thead>
				<tbody>
					<c:choose>
						<c:when test="${empty ebayActList}">
							<tr>
								<td style="background-color: #ffffff" colspan="8">no result</td>
							</tr>
						</c:when>
						<c:otherwise>
							<s:iterator value="ebayActList" status="status">
								<tr class="list_td" onMouseOver="this.className='list_td0'"
									onMouseOut="this.className='list_td'"
									onDblClick="viewDetail('<s:property value="ebayActList[#status.index].id" />')"
									title="double click to view detail">
									<td align="center"><s:property value="#status.index + 1" /></td>

									<td align="center"><s:property
											value="ebayActList[#status.index].ebayAct" /></td>

									<td align="center"><s:property
											value="ebayActList[#status.index].emailAct" /></td>

									<td align="center"><s:property
											value="ebayActList[#status.index].emailPsw" /></td>
								</tr>
							</s:iterator>
						</c:otherwise>
					</c:choose>
				</tbody>
			</table>
			<div class="dclass_pager">
				<table width="100%">
					<tr>
						<td width="100%" height="1px" bgcolor="#336699"></td>
					</tr>
					<tr>
						<td width="100%" align="center"><c:choose>
								<c:when test="${empty ebayActList}">共 0页  第0页   共0条记录</c:when>
								<c:otherwise>
									<c:import url="/admin/common/page3.jsp"></c:import>
								</c:otherwise>
							</c:choose></td>
					</tr>
				</table>
			</div>
			<!--内容结束-->
		</div>
	</div>
</body>
</html>